package org.extend;
class a {
    public void method1() {
        System.out.println("method1");
    }
    public void method2() {
        method1();
    }
}
class b extends a{
    public void method3() {
        System.out.println("method3");
    }
}
class c{
    public static void main(String[] args) {
        a a1=new b();
        calla((b)a1);

    }
    public static void calla(b b1) {
        b1.method1();
        b1.method2();
        b1.method3();
    }
}

